package pay

import (
	"context"
	"git.900sui.cn/kc/rpcinterface/client"
	"git.900sui.cn/kc/rpcinterface/interface/pay"
)

type XindaluPay struct {
	client.Baseclient
}

func (x *XindaluPay) Init() *XindaluPay {
	x.ServiceName = "rpc_pay"
	x.ServicePath = "XindaluPay"
	return x
}


// 获取银联用户标识
func (x *XindaluPay) GetPaypalTag(ctx context.Context, args *pay.ArgsGetPaypalTag, reples *pay.ReplyGetPaypalTag) error {
	return x.Call(ctx, "GetPaypalTag", args, reples)
}

// 交易查询接口
func (x *XindaluPay) TradeQuery(ctx context.Context, args *pay.ArgsTradeQuery, replies *pay.ReplyTradeQuery) error {
	return x.Call(ctx, "TradeQuery", args, replies)
}

// 公众号查询
func (x *XindaluPay) GetwxInfo(ctx context.Context, args *pay.ArgsGetwxInfo, relies *pay.ReplyGetwxInfo) error {
	return x.Call(ctx, "GetwxInfo", args, relies)
}

//统一下单
func (x *XindaluPay) UnionidOrder(ctx context.Context, args *pay.ArgsunionidOrder, replies *pay.ReplyUniondOrder) error {
	return x.Call(ctx, "UnionidOrder", args, replies)
}

//异步通知
func (x *XindaluPay) Notify(ctx context.Context, replies *pay.ReplyNotify) error {
	return x.Call(ctx, "Notify", nil, replies)
}

//订单分账
func (x *XindaluPay) OrderAccount(ctx context.Context, args *pay.ArgsOrderAccount, replies *pay.ReplyOrderAccount) error {
	return x.Call(ctx, "OrderAccount", args, replies)
}

//分账规则查询
func (x *XindaluPay) MerchantAccountQuery(ctx context.Context, args *pay.ArgsMerchantAccountQuery, replies *pay.ReplyMerchantAccountQuery) error {
	return x.Call(ctx, "MerchantAccountQuery", args, replies)
}

//分账规则查询
func (x *XindaluPay) GetOpenid(ctx context.Context, args *pay.ArgsGetOpenid, reply *pay.ReplyGetOpenid) error {
	return x.Call(ctx, "GetOpenid", args, reply)
}
func (x *XindaluPay) GetAliUserInfo(ctx context.Context, args *pay.ArgsGetAliUserInfo, reply *pay.ReplyGetAliUserInfo) error {
	return x.Call(ctx, "GetAliUserInfo", args, reply)
}
